home *** CD-ROM | disk | FTP | other *** search
/ Champak 50 / Volume 50 - JOGO DISK .iso / Games / miffypuzzle.swf / scripts / frame_2 / PlaceObject2_33_131 / CLIPACTIONRECORD onClipEvent(load).as
Text File  |  2007-09-27  |  2KB  |  65 lines

  1. onClipEvent(load){
  2.    function pieceLoad()
  3.    {
  4.       pieceRandom = _root.piecesRandomArray[thisPiece - 1];
  5.       piecesAtStart = _root.piecesAtStart;
  6.       this._x = piecesAtStart[pieceRandom * 2 - 2];
  7.       this._y = piecesAtStart[1 + pieceRandom * 2 - 2];
  8.       if(newPuzzle == 1)
  9.       {
  10.          pieceRandom = _root.piecesRandomArray[thisPiece - 1];
  11.          piecesAtStart = _root.piecesAtStart;
  12.          this._x = piecesAtStart[pieceRandom * 2 - 2];
  13.          this._y = piecesAtStart[1 + pieceRandom * 2 - 2];
  14.          newPuzzle = 0;
  15.       }
  16.    }
  17.    thisPiece = 5;
  18.    xNumber = 0;
  19.    yNumber = 1;
  20.    pieceLoad();
  21.    this.M_background01._visible = 0;
  22.    this.M_background02._visible = 0;
  23.    this.M_background03._visible = 0;
  24.    this.M_background04._visible = 0;
  25.    this.M_background05._visible = 0;
  26.    if(xNumber >= 1)
  27.    {
  28.       this.M_background01._x -= 61.5 * xNumber;
  29.       this.M_background02._x -= 61.5 * xNumber;
  30.       this.M_background03._x -= 61.5 * xNumber;
  31.       this.M_background04._x -= 61.5 * xNumber;
  32.       this.M_background05._x -= 61.5 * xNumber;
  33.    }
  34.    if(yNumber >= 1)
  35.    {
  36.       this.M_background01._y -= 61.5 * yNumber;
  37.       this.M_background02._y -= 61.5 * yNumber;
  38.       this.M_background03._y -= 61.5 * yNumber;
  39.       this.M_background04._y -= 61.5 * yNumber;
  40.       this.M_background05._y -= 61.5 * yNumber;
  41.    }
  42.    if(_root.puzzleNumber == 1)
  43.    {
  44.       this.M_background01._visible = 1;
  45.    }
  46.    else if(_root.puzzleNumber == 2)
  47.    {
  48.       this.M_background02._visible = 1;
  49.    }
  50.    else if(_root.puzzleNumber == 3)
  51.    {
  52.       this.M_background03._visible = 1;
  53.    }
  54.    else if(_root.puzzleNumber == 4)
  55.    {
  56.       this.M_background04._visible = 1;
  57.    }
  58.    else if(_root.puzzleNumber == 5)
  59.    {
  60.       this.M_background05._visible = 1;
  61.    }
  62.    _root.dupXX._x = _root.xpos;
  63.    _root.dupXX._y = _root.ypos;
  64. }
  65.